//
//  GaoDeMapViewController.m
//  HanlinWeather
//
//  Created by 任翰林 on 2017/4/5.
//  Copyright © 2017年 任翰林. All rights reserved.
//

#import "GaoDeMapViewController.h"
#import "GaoDeMapView.h"
#import <AMapFoundationKit/AMapFoundationKit.h>
#import <MAMapKit/MAMapKit.h>
#import "GaoDeResultViewController.h"
@interface GaoDeMapViewController ()

@end

@implementation GaoDeMapViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = KRandomColour;
    [self setUpUI];
}

- (void)setUpUI
{
    GaoDeMapView * view = [[GaoDeMapView alloc]initWithFrame:[UIScreen mainScreen].bounds];
    [self.view addSubview:view];
    view.gaoDeResultPushBlock = ^(AMapPOISearchResponse * mapResponse){
    
        GaoDeResultViewController * resultVC = [GaoDeResultViewController new];
        [self.navigationController pushViewController:resultVC animated:YES];
        resultVC.mapResponse = mapResponse;
        HLLog(@"%ld",mapResponse.pois.count);
        
    };
}

@end
